package com.qk.common.util;

/**
 * @author fantuan
 * @created 2025/10/14 18:36
 * @description
 */
public class CurrentUserContextHolders {

    private static final ThreadLocal<Integer> USER_CONTEXT = new ThreadLocal<>();

    private CurrentUserContextHolders() {
    }


    public static void set(Integer userId) {
        USER_CONTEXT.set(userId);
    }

    public static Integer get() {
        return USER_CONTEXT.get();
    }

    public static void remove() {
        USER_CONTEXT.remove();
    }


}
